package Abilities;


public class Ability {
	
	private String name;
	private int totalAmount;
	private int maxHit;
	private int abilityDPS;
	
	public Ability(String aName) {
		this.name = aName;
	}
	
	public Ability(String aName, int amount) {	
		this(aName);
		this.setTotalAmount(amount);
		this.setMaxHit(amount);
	}

	
	//getters
	public String getName() {
		return name;
	}

	public int getTotalAmount() {
		return totalAmount;
	}
	
	public int getMaxHit() {
		return maxHit;
	}

	//setters
	public void setTotalAmount(int damageDone) {
		this.setMaxHit(damageDone);
		this.totalAmount += damageDone;
		
	}
	
	public void setMaxHit(int maxHit) {
		
		if (this.getMaxHit() < maxHit) {
			this.maxHit = maxHit;
		}
	}
	
	public void setAbilityDPS(int amount, int time) {
		if (time < 1) {
			time = 1;
		}
		this.abilityDPS = (amount / time);
	}
	
	@Override
	public String toString() {
		return "Ability: " + getName() + " " + getTotalAmount() + " " + getMaxHit();
	}
	

}
